﻿using System;
using System.Collections.Generic;
using System.Text;

namespace UtilZ.Dotnet.Ex.Communication.Net.Web
{
    /// <summary>
    /// 响应内容范围
    /// </summary>
    public class ContentRangeInfo
    {
        /// <summary>
        /// 内容范围字符串
        /// </summary>
        public string ContentRange { get; private set; }

        /// <summary>
        /// 内容起始偏移位置
        /// </summary>
        public long Offset { get; private set; }

        /// <summary>
        /// 内容长度
        /// </summary>
        public long Length { get; private set; }



        /// <summary>
        /// 构造函数
        /// </summary>
        /// <param name="contentRange">内容范围字符串</param>
        /// <param name="offset">内容起始偏移位置</param>
        /// <param name="length">内容长度</param>
        public ContentRangeInfo(string contentRange, long offset, long length)
        {
            this.ContentRange = contentRange;
            this.Offset = offset;
            this.Length = length;
        }




        /// <summary>
        /// 重写ToString
        /// </summary>
        /// <returns>String</returns>
        public override string ToString()
        {
            return this.ContentRange;
        }
    }
}
